<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page import="school.*,school.dao.*,school.entity.*,util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
  显示所有年级：
  <br/>
    <%
    MySqlStudentDaoImpl ge=new MySqlStudentDaoImpl();
    List<Grade> gg=ge.showG();
 	 for (Grade grade : gg) {
			out.println(grade +"\n");
		}
     %>
     <br/>
     分页显示第一页学生，每页10条:
      <br/>
     <%
     List<Student> stu=ge.query(1, 10);
    for(Student st:stu){
     out.println(st + "\t\n");
     }
      %>
  </body>
</html>
